%div{:style => "min-width:100%"}
  %table{:cellpadding => "0", :cellspacing => "0", :border => "0", :align => "center", :style => "text-align:center;margin:0;padding:0;width:100%!important;line-height:100%!important;background: #ebebeb;"}
    %tbody
      %tr
        %td
          %table{:cellpadding=> "0", :cellspacing => "0", :border => "0", :align => "center", :style => "text-align:center"}
            %tr
              %td{:style => "width:100%;max-width:602px;padding-top:20px;", :valign => "top"}
                %table{:align => "center", :border => "0", :cellpadding => "0", :cellspacing => "0", :style => "background:#fff;", width:"100%"}
                  %tbody
                    - if @current_community.wide_logo.present?
                      %tr
                        %td{:width => "5%"}
                        %td{:valign => "top", :width => "90%", :align => "center", :style => "padding-top:5px;"}
                          = image_tag @current_community.wide_logo.url(:header), alt: @current_community.full_name(I18n.locale), style: 'margin: 0 auto;'
                        %td{:width => "5%"}
                    %tr
                      %td{:width => "7.5%"}
                      %td{:valign => "top", :width => "85%", :style => "font-family:Helvetica Neue, Helvetica, Arial, sans-serif; font-weight:400; font-size:14px; padding: 10px 0 40px 0; text-align: left; line-height:22px;"}
                        %p= t("emails.common.hey", :name => PersonViewUtils.person_display_name_for_type(@recipient, "first_name_only"))
                        - customization = @current_community.community_customizations.find_by_locale(@url_params[:locale])
                        - if customization && !customization.welcome_email_content.blank?
                          = customization.welcome_email_content.html_safe
                        - else
                          = render :partial => "admin/communities/default_welcome_email"
                      %td{:width => "7.5%"}
              - if @show_branding_info
                = render :partial => "layouts/email_non_whitelabel_branding", locals: {link_to_sharetribe: "https://www.sharetribe.com/?utm_source=#{@current_community.ident}.sharetribe.com&utm_medium=email&utm_campaign=nowl-emails-welcome"}
            - unless @recipient.has_admin_rights?(@current_community) && !@test_email
              %tr
                %td{:style => "text-align: center;width:100%;max-width:602px;padding: 0 45px;"}
                  %p{:style => "margin-top:15px;margin-bottom:15px;font-family:helvetica,arial,sans-serif;font-size:12px;color:#464646;"}
                    = t("emails.welcome_email.welcome_email_footer_text", :settings_link => link_to(t("emails.welcome_email.settings_link_text"), notifications_person_settings_url(@recipient, @url_params))).html_safe



